package com.sl.config;


import org.springframework.boot.context.properties.ConfigurationProperties;

// 获取环境参数@ConfigurationProperties：注解标记这是一个配置类
@ConfigurationProperties("spring.http")
public class HttpProperties {
    private Long connectTimeout;
    private Long writeTimeout;
    private Long readTimeout;
    private Boolean retryOnConnectionFailure;

    public long getConnectTimeout() {
        return connectTimeout;
    }

    public void setConnectTimeout(long connectTimeout) {
        this.connectTimeout = connectTimeout;
    }

    public long getWriteTimeout() {
        return writeTimeout;
    }

    public void setWriteTimeout(long writeTimeout) {
        this.writeTimeout = writeTimeout;
    }

    public long getReadTimeout() {
        return readTimeout;
    }

    public void setReadTimeout(long readTimeout) {
        this.readTimeout = readTimeout;
    }

    public boolean isRetryOnConnectionFailure() {
        return retryOnConnectionFailure;
    }

    public void setRetryOnConnectionFailure(boolean retryOnConnectionFailure) {
        this.retryOnConnectionFailure = retryOnConnectionFailure;
    }
}

